package com.xingkeduo.pojo.query;

import com.xingkeduo.util.pojo.base.BaseQuery;
import com.xingkeduo.util.pojo.enums.SexEnum;
import com.xingkeduo.util.pojo.enums.YesNoEnum;
import org.apache.ibatis.type.Alias;

import java.util.List;

/**
 * 一线员工社会属性查询类
 * 
 * @author 高杰
 * @time 2018年12月25日 下午5:06:56
 * @description
 */
@Alias("CraftsmanSocialQO")
public class CraftsmanSocialQO extends BaseQuery<CraftsmanSocialQO> {
	private String name;
	private String phone;
	private String idCard;
	private SexEnum sex;

	private String condition;

	private List<Long> ids;

	private YesNoEnum isDelete;

	private int type;

	public int getType() {
		return type;
	}

	public CraftsmanSocialQO setType(int type) {
		this.type = type;
		return this;
	}

	public YesNoEnum getIsDelete() {
		return isDelete;
	}

	public CraftsmanSocialQO setIsDelete(YesNoEnum isDelete) {
		this.isDelete = isDelete;
		return this;
	}

	public List<Long> getIds() {
		return ids;
	}

	public CraftsmanSocialQO setIds(List<Long> ids) {
		this.ids = ids;
		return this;
	}

	public String getCondition() {
		return condition;
	}

	public void setCondition(String condition) {
		this.condition = condition;
	}

	public String getName() {
		return name;
	}

	public CraftsmanSocialQO setName(String name) {
		this.name = name;
		return this;
	}

	public String getPhone() {
		return phone;
	}

	public CraftsmanSocialQO setPhone(String phone) {
		this.phone = phone;
		return this;
	}

	public String getIdCard() {
		return idCard;
	}

	public CraftsmanSocialQO setIdCard(String idCard) {
		this.idCard = idCard;
		return this;
	}

	public SexEnum getSex() {
		return sex;
	}

	public CraftsmanSocialQO setSex(SexEnum sex) {
		this.sex = sex;
		return this;
	}

	public boolean isEmpty() {
		if (!isSuperEmpty() || condition != null || sex != null)
			return false;

		return true;
	}

	public boolean isEmptyPhone() {
		if (!isSuperEmpty() || phone != null)
			return false;

		return true;
	}

	@Override
	public String toString() {
		return "CraftsmanSocialQO{" +
				"name='" + name + '\'' +
				", phone='" + phone + '\'' +
				", idCard='" + idCard + '\'' +
				", sex=" + sex +
				", condition='" + condition + '\'' +
				", ids=" + ids +
				", isDelete=" + isDelete +
				", type='" + type + '\'' +
				'}';
	}
}
